<template>
  父组件<p />
  <child-comp></child-comp>
  <child-comp></child-comp>
  <child-comp></child-comp>
</template>

<script>
import { reactive, toRefs } from '@vue/reactivity'
import ChildComp from './ChildComp.vue'
export default {
  components: { ChildComp },
    setup () {
        const state = reactive({
            count: 0
        })

        return {
            ...toRefs(state)
        }
    }
}
</script>

<style>

</style>